<!DOCTYPE html>
<html class="x-admin-sm">
  <head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="__ADMIN__/css/font.css">
    <link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
    <script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>
    <style>
        .layui-btn+.layui-btn{
            margin-left: 0;
        }
        .layui-table td, .layui-table th
        {
            min-width: 50px !important;
        }
    </style>
  </head>
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a><cite>{$nav}</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon layui-icon-refresh-3" style="line-height:30px"></i></a>
    </div>
    <div class="x-body x-admin">

        <div style="font-size:20px;padding:10px;text-align:center;border-bottom:1px solid #999;margin-bottom:20px;width: 800px;">
            <form class="layui-form" action="">
            <div class="layui-input-inline" style="width:90px">
                <select>
                    <option>2022</option>
                </select>
            </div>
            年
            <div class="layui-input-inline" style="width:65px">
                <select lay-filter="month">
                    <option value="02" {$month=='02'?'selected':''}>02</option>
                    <option value="03" {$month=='03'?'selected':''}>03</option>
                    <option value="04" {$month=='04'?'selected':''}>04</option>
                    <option value="05" {$month=='05'?'selected':''}>05</option>
                    <option value="06" {$month=='06'?'selected':''}>06</option>
                    <option value="07" {$month=='07'?'selected':''}>07</option>
                    <option value="08" {$month=='08'?'selected':''}>08</option>
                </select>
            </div>
            月度统计表
            </form></div>
        
        <div class="layui-table-body layui-table-main" style="width: 800px;min-height:0;">
        <table class="layui-table layui-form" lay-filter="liveData" id="liveData"> </table>
        </div>
        
        <script type="text/html" id="toolbarDemo">
        </script>
        <script type="text/html" id="rank">{{d.LAY_TABLE_INDEX+1}}</script>
    </div>


    <script>
      layui.use(['form','layer','jquery','table','util'], function(){
        form = layui.form,
        layer = layui.layer
        ,$ = layui.jquery
        ,table = layui.table
        ,util = layui.util;
        
        form.on('select(month)', function(data){
            window.location.href="?month="+data.value
        });
        
        table.render({
            elem: '#liveData'
            ,url:'{:url('admin/dataTable/dataStatForMonth')}?month={:input()['month']}'
            ,toolbar: '#toolbarDemo' 
            ,defaultToolbar: ['filter', 'exports', 'print']
            ,limit: {:input()['limit']?:50}
            ,title: '月度统计表'
            ,cols: [[
                //{field: 'rank', title: '序号', width: 80, sort: true, fixed: 'left', templet: '#rank'},
                {field:'depart_name', width:150, sort: true,title:"部门"},
                {field:'count',  sort: true,width:70, title:"人数"},
                {field:'s', sort: true,title:"业绩"},
                {field:'avg', sort: true,width:130 ,title:"平均业绩"},
                {field:'c', sort: true,width:130 ,title:"启动活动场次"},
                {field:'qdl', sort: true,width:80 ,title:"签单量"},
                {field:'yms',sort: true, width:100 ,title:"做页面数量"},
            ]]
            ,page: false
        });

      });

    </script>
  </body>

</html>